#ifndef _UFO_COMMON_IMAGE_H_
#define _UFO_COMMON_IMAGE_H_

#include "file.h"
#include "render.h"

typedef struct tagIMAGE {
	int width, height, pixelSize;
	unsigned char *buffer;
	HTEXTURE id;//### for texture id
}IMAGE;

typedef enum _UFO_IMAGE_TYPE
{
	IMAGE_PNG,
	IMAGE_JPG
}UFO_IMAGE_TYPE;

//PUFO_Image ufoCreateImage(int width, int height, int pixelSize);

int ufoImageCreate(int width, int height, int pixelSize, unsigned char *buffer, IMAGE *pImage);

int ufoImageDecode(UFO_IO pFile, int infoOnly, IMAGE *pImage);

int ufoImageFromFile(const char *filename, int infoOnly, IMAGE *pImage);

int ufoImageDelete(IMAGE *pImage);

#endif